// Evol scripts.
// Authors:
//    Hal9000
//    Qwerty Dragon
//    Reid
// Description:
//    Sailor part of the Gugli's quest.
//    Aquada box.

000-1,34,111,0	script	Tibbo	NPC_ELVEN_MAN_STANDING,{
    if (getq(General_Narrator) > 0)
    {
        sailortalk;
    }

    .@g = getq(ShipQuests_Gugli);
    if (.@g == 0) goto L_NoTask;

    .@q = getq(ShipQuests_Tibbo);
    if (.@q == 1) goto L_CallFunc;

    mesn;
    mesq l("Uh? Hi! I'm sorry, but I have no time for chatting.");
    next;

    select
        l("Fine... I was just going to give you some help...");

    mes "";
    mesn;
    mesq l("Hel... What?! Wait!");
    next;
    mesq l("What kind of help?");
    next;

    select
        lg("Gugli asked me to help you carrying one of these boxes you are filling.");

    mes "";
    mesn;
    mesq l("Then it seems I have to apologize.");
    next;
    mesq l("I am surprised someone has been sent here to help. It is quite... unusual.");
    next;
    mesq l("Bring this box to Gugli. He will be extremely happy!");
    next;

    inventoryplace AquadaBox, 1;

    setq ShipQuests_Tibbo, 1;
    getitem AquadaBox, 1;

    mes "";
    mesn;
    mesq l("Thank you and be careful with that box. I have worked really hard to fill it!");

    goto L_Close;

L_CallFunc:
    sailorfood;

    menu
        rif(getq(ShipQuests_Gugli) > 1, l("Task is done.")), L_TaskDone,
        rif(getq(ShipQuests_Tibbo) == 1 && (getq(ShipQuests_Ale) == 0 || getq(ShipQuests_Astapolos) == 0 || getq(ShipQuests_Gulukan) == 0 || getq(ShipQuests_Jalad) == 0 || getq(ShipQuests_QMuller) == 0), l("I'm still busy, I need to find the other sailors.")), -,
        l("What's that food?"), L_Aquada;

    mes "";
    mesn;
    mesq l("Who are you looking for?");
    next;

    menu
        rif(getq(ShipQuests_Ale) == 0, l("Ale.")), L_Top,
        rif(getq(ShipQuests_Astapolos) == 0, l("Astapolos.")), L_Top,
        rif(getq(ShipQuests_Gulukan) == 0, l("Gulukan.")), L_Top,
        rif(getq(ShipQuests_Jalad) == 0, l("Jalad.")), L_Top,
        rif(getq(ShipQuests_QMuller) == 0, l("Q'Muller.")), L_Top,
        l("Nobody."), -;

    goto L_Close;

L_Top:
    mes "";
    mesn;
    mesq l("I've seen him at the top of the island.");
    next;
    mesq l("You should walk to the north to find him.");

    close;

L_Aquada:
    mes "";
    mesn;
    mesq l("This is an @@, a light blue sea fruit. They're highly desired in the archipelago.", getitemlink(Aquada));
    next;
    mesq l("You can find them in the ocean, near corals and other sea beings. But the sea is too heavy today, you shouldn't try swimming for now.");
    next;
    mesq lg("Otherwise, if you really want one, and if you feel capable, you can try killing tortugas or crocs if you're strong enough. I'm sure they could drop one or two @@s.",
            "Otherwise, if you really want one, and if you feel capable, you can try killing tortugas or crocs if you're strong enough. I'm sure they could drop one or two @@s.", getitemlink(Aquada));

    close;

L_NoTask:
    mes "";
    mesn;
    mesq l("I'm sorry but I have no time to chat with you.");

    close;

L_TaskDone:
    mes "";
    mesn;
    mesq l("Awesome!");

    close;

L_Close:
    goodbye;

OnInit:
    .sex = G_MALE;
    .distance = 2;
    end;
}
